﻿#pragma once

#include "BaseGraphicView.h"

#include <boost/signal.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
#include <SFML/Graphics.hpp>
#include "../../abstract/IDeductionView.h"
#include "../../helpers/graphic/deduction/SearchedCardsDialog.h"
#include "../../helpers/graphic/deduction/DeductedCardsDialog.h"
#include "../../helpers/graphic/deduction/DeductedCardPickDialog.h"
#include "../../../utils/gui/Form.h"
#include "../../../domain/models/CardSet.h"
#include "../../../domain/models/Player.h"

namespace Views {
	namespace Graphic {
		class DeductionView: public IDeductionView, public BaseGraphicView
		{
			boost::signals::connection connection;
			Helpers::Graphic::Deduction::SearchedCardsDialog* searched_cards_dialog;
			Helpers::Graphic::Deduction::DeductedCardsDialog* deducted_cards_dialog;
			Helpers::Graphic::Deduction::DeductedCardPickDialog* deducted_card_pick_dialog;

		public:
			DeductionView(Utils::GUI::Form*);
			virtual void openPickSearchedCardsDialog(Players::Player*, Cards::PlayersCards, Cards::WeaponsCards);
			virtual void openPickCardDialog(Players::Player*, Cards::CardSet&);

			virtual void showDeductedCard(Cards::Card* card, Players::Player* current_player, Players::Player* card_owner);
			virtual void showNoCardsDeducted(Cards::CardSet& cards, Players::Player* player);
		protected:
			virtual void onSearchedCardsPick(Cards::PlayerCard*, Cards::WeaponCard*);
			virtual void onDeductedCardPick(Cards::Card*);
			virtual void onDeductedCardsDialogClose();
		};
	}
}

